// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_SCHEDULER
// * CreateDate    : 2014-06-05 18:30:38
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:38
// * LastChanger   : 2014-06-05 18:30:38
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SalesSchedulerEntity : EntityBase
    {
        public SalesSchedulerTable TableSchema
        {
            get
            {
                return SalesSchedulerTable.Current;
            }
		}
		
		public SalesSchedulerEntity()
        {

        }
		
		public SalesSchedulerEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.UserId = Convert.ToString(CommonFunctions.ToObject(dr["USER_ID"]));
			this.AppAllDay = Convert.ToBoolean(CommonFunctions.ToObject(dr["APP_ALL_DAY"]));
			this.AppDescription = Convert.ToString(CommonFunctions.ToObject(dr["APP_DESCRIPTION"]));
			this.AppEnd = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_END"]));
			this.AppLabel = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_LABEL"]));
			this.AppLocation = Convert.ToString(CommonFunctions.ToObject(dr["APP_LOCATION"]));
			this.AppRecurrenceInfo = Convert.ToString(CommonFunctions.ToObject(dr["APP_RECURRENCE_INFO"]));
			this.AppReminderInfo = Convert.ToString(CommonFunctions.ToObject(dr["APP_REMINDER_INFO"]));
			this.AppResourceId = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_RESOURCE_ID"]));
			this.AppStart = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_START"]));
			this.AppStatus = Convert.ToString(CommonFunctions.ToObject(dr["APP_STATUS"]));
			this.AppSubject = Convert.ToString(CommonFunctions.ToObject(dr["APP_SUBJECT"]));
			this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
        }
		
		public SalesSchedulerEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.UserId = Convert.ToString(CommonFunctions.ToObject(dr["USER_ID"]));
			this.AppAllDay = Convert.ToBoolean(CommonFunctions.ToObject(dr["APP_ALL_DAY"]));
			this.AppDescription = Convert.ToString(CommonFunctions.ToObject(dr["APP_DESCRIPTION"]));
			this.AppEnd = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_END"]));
			this.AppLabel = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_LABEL"]));
			this.AppLocation = Convert.ToString(CommonFunctions.ToObject(dr["APP_LOCATION"]));
			this.AppRecurrenceInfo = Convert.ToString(CommonFunctions.ToObject(dr["APP_RECURRENCE_INFO"]));
			this.AppReminderInfo = Convert.ToString(CommonFunctions.ToObject(dr["APP_REMINDER_INFO"]));
			this.AppResourceId = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_RESOURCE_ID"]));
			this.AppStart = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_START"]));
			this.AppStatus = Convert.ToString(CommonFunctions.ToObject(dr["APP_STATUS"]));
			this.AppSubject = Convert.ToString(CommonFunctions.ToObject(dr["APP_SUBJECT"]));
			this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesSchedulerTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_ID)); }
            set { SetData(SalesSchedulerTable.C_ID, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesSchedulerTable.C_CREATED_DATE)); }
            set { SetData(SalesSchedulerTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_CREATED_BY)); }
            set { SetData(SalesSchedulerTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesSchedulerTable.C_UPDATED_DATE)); }
            set { SetData(SalesSchedulerTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_UPDATED_BY)); }
            set { SetData(SalesSchedulerTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SalesSchedulerTable.C_IS_ACTIVE)); }
            set { SetData(SalesSchedulerTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string UserId
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_USER_ID)); }
            set { SetData(SalesSchedulerTable.C_USER_ID, value); }
        }
		
        [DataMember]
        public bool AppAllDay
        {
            get { return Convert.ToBoolean(GetData(SalesSchedulerTable.C_APP_ALL_DAY)); }
            set { SetData(SalesSchedulerTable.C_APP_ALL_DAY, value); }
        }
		
        [DataMember]
        public string AppDescription
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_DESCRIPTION)); }
            set { SetData(SalesSchedulerTable.C_APP_DESCRIPTION, value); }
        }
		
        [DataMember]
        public DateTime AppEnd
        {
            get { return Convert.ToDateTime(GetData(SalesSchedulerTable.C_APP_END)); }
            set { SetData(SalesSchedulerTable.C_APP_END, value); }
        }
		
        [DataMember]
        public int AppLabel
        {
            get { return Convert.ToInt32(GetData(SalesSchedulerTable.C_APP_LABEL)); }
            set { SetData(SalesSchedulerTable.C_APP_LABEL, value); }
        }
		
        [DataMember]
        public string AppLocation
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_LOCATION)); }
            set { SetData(SalesSchedulerTable.C_APP_LOCATION, value); }
        }
		
        [DataMember]
        public string AppRecurrenceInfo
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_RECURRENCE_INFO)); }
            set { SetData(SalesSchedulerTable.C_APP_RECURRENCE_INFO, value); }
        }
		
        [DataMember]
        public string AppReminderInfo
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_REMINDER_INFO)); }
            set { SetData(SalesSchedulerTable.C_APP_REMINDER_INFO, value); }
        }
		
        [DataMember]
        public int AppResourceId
        {
            get { return Convert.ToInt32(GetData(SalesSchedulerTable.C_APP_RESOURCE_ID)); }
            set { SetData(SalesSchedulerTable.C_APP_RESOURCE_ID, value); }
        }
		
        [DataMember]
        public DateTime AppStart
        {
            get { return Convert.ToDateTime(GetData(SalesSchedulerTable.C_APP_START)); }
            set { SetData(SalesSchedulerTable.C_APP_START, value); }
        }
		
        [DataMember]
        public string AppStatus
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_STATUS)); }
            set { SetData(SalesSchedulerTable.C_APP_STATUS, value); }
        }
		
        [DataMember]
        public string AppSubject
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_SUBJECT)); }
            set { SetData(SalesSchedulerTable.C_APP_SUBJECT, value); }
        }
		
        [DataMember]
        public string AppType
        {
            get { return Convert.ToString(GetData(SalesSchedulerTable.C_APP_TYPE)); }
            set { SetData(SalesSchedulerTable.C_APP_TYPE, value); }
        }
		
		#endregion
	}
	
	
}	

